import request from '../utils/request';

// http://localhost:8081/api/v1/moment/list?page=2&pageSize=15
export const getMomentListService = (params) => {
  return request.get('/moment/list', {
    params
  });
};

// POST http://localhost:8081/api/v1/moment
export const createMomentService = (data) => {
  return request.post('/moment', data);
};

//post http://localhost:8081/api/v1/moment/{{momentId}}/toggle-like
export const toggleMomentLikeService = (momentId) => {
  return request.post(`/moment/${momentId}/toggle-like`);
};

// DELETE http://localhost:8081/api/v1/moment/{{momentId}}
export const deleteMomentService = (momentId) => {
  return request.delete(`/moment/${momentId}`);
};


